import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '@/views/home/homeIndex.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect:'/homeIndex'
  },
    //首页
  {
    path: '/homeIndex',
    name: 'homeIndex',
    component: Home,
    meta:{
      title:'优亲贝贝数据中心'
    }
  },
    //邀请排行榜
  {
    path: '/inviteIndex',
    name: 'inviteIndex',
    component: () => import('@/views/invitePeople/inviteIndex.vue'),
    meta:{
      title:'经销商排行榜'
    }
  },
  {
    path: '/login',
    name: 'login',
    component: () => import('@/views/login/login.vue'),
    meta:{
      title:'登陆'
    }
  },
   //邀请排行榜
   {
    path: '/storeIndex',
    name: 'storeIndex',
    component: () => import('@/views/invitePeople/storeIndex.vue'),
    meta:{
      title:'门店排行榜'
    }
  },
    //小竹叶分析
  {
    path: '/bambooIndex',
    name: 'bambooIndex',
    component: () => import('@/views/bamboo/bambooIndex.vue'),
    meta:{
      title:'优亲贝贝数据中心'
    }
  },
    //行为分析
  {
    path: '/activeAnalysis',
    name: 'activeAnalysis',
    component: () => import('@/views/activeAnalysis/activeAnalysis.vue'),
    meta:{
      title:'优亲贝贝数据中心'
    }
  },
    //活跃分析
  {
    path: '/behaviorAnalysis',
    name: 'behaviorAnalysis',
    component: () => import('@/views/behaviorAnalysis/behaviorAnalysis.vue'),
    meta:{
      title:'优亲贝贝数据中心'
    }
  },
    //小竹问答分析
  {
    path: '/answerAsk',
    name: 'answerAsk',
    component: () => import('@/views/answerAsk/answerAsk.vue'),
    meta:{
      title:'优亲贝贝数据中心'
    }
  },

  //新媒体分析
  {
    path: '/mediaAnalysis',
    name: 'mediaAnalysis',
    component: () => import('@/views/mediaAnalysis/mediaAnalysis.vue'),
    meta:{
      title:'优亲贝贝数据中心'
    }
  }
]

const router = new VueRouter({
  // mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
